/*
 * @Company: TWL
 * @Author: xue jian
 * @Email: xuejian@kanzhun.com
 * @Date: 2019-11-18 22:21:12
 */
#include <Eigen/Dense>
#include <vector>
#include <iostream>
#include <memory>
using namespace Eigen;
int main() {

	std::vector<float> haha({1, 2, 3, 4, 3, 2, 1});
	std::string test(sizeof(float)*haha.size(), '0');
	//std::cout<<sizeof(haha)<<std::endl;
	//std::vector<uint8_t> test(sizeof(haha));
	std::cout<<test<<std::endl;
	std::memcpy(&test[0], &haha[0], test.size());
	std::cout<<test.size()<<std::endl;
	//test = "123412341234123412341234";
	//std::cout<<test<<std::endl;
	//auto haha2 = std::unique_ptr<std::vector<float>>(new std::vector<float>());
	std::vector<float> haha2(10, 0);
	std::cout<<haha2.size()<<std::endl;
	//float* haha2 = new float[sizeof(haha)/sizeof(float)];
	std::memcpy(&haha2[0], &test[0], test.size());
	//float *v =reinterpret_cast<float*>(&test[0]);
	//std::cout<<test.size()<<std::endl;
	Map<MatrixXf> tmp(&haha2[0], 1, 7);
	std::cout<<tmp<<std::endl;
	//std::cout<<&haha<<std::endl;
	//std::cout<<&haha2<<std::endl;
	//std::cout<<&test<<std::endl;

}